# -------------------------------------------------
# Project created by QtCreator 2012-11-07T09:19:54
# -------------------------------------------------
TARGET = serialTermCN
TEMPLATE = app

SOURCES += main.cpp \
    mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui

# EN COMPILATION NATIVE WINDOWS (Qt4.8.2) OK bon comportement sans tout ca !!
#icones in menu in win7 ... hum ca existait pas en Qt4.6 .. mais en Qt4.8 ok ... :s
#QTPLUGIN += qico
#QTPLUGIN += qjpeg
#CONFIG += staticlib
#LIBS += -L/usr/lib/qt4/plugins/imageformats/


## en fait la solution est de compiler le support qico, qjpeg dans Qt , pas en plugins !!!
## http://lists.trolltech.com/qt-interest/2008-03/msg00245.html

## ou installer libjpeg62-dev !!??

# ####### path lib Serial
win32 { 
    #cross-compile from linux
    #INCLUDEPATH += /extension/qextserialport/src
    #CONFIG(debug, debug|release):LIBS += /extension/qextserialport-win32-release/qextserialportd1.dll
    #else:LIBS += /extension/qextserialport-win32-release/qextserialport1.dll

    # Native compilation windows
    #INCLUDEPATH += C:/dev/qextserialport/src
    #CONFIG(debug, debug|release):LIBS += C:/dev/qextserialport/debug/qextserialportd1.dll
    #else:LIBS += C:/dev/qextserialport/release/qextserialport1.dll

    #static inside
    include(c:/dev/_my_/uart_qt/qextserialport/src/qextserialport.pri)

    ##eviter la libgcc_s_dw2-1.dll oui, IL FAUT LES 2!
    QMAKE_LFLAGS +=  -static -static-libgcc

    MOC_DIR = win32-build/
    OBJECTS_DIR = win32-build/
    UI_DIR = win32-build/
    RCC_DIR = win32-build/
    TARGET = win32-build/serialQt-win32

    ## application icon windows
    RC_FILE = myapp.rc
    OTHER_FILES += $$RC_FILE
}
unix { 
    #shared lib dll/so
    #INCLUDEPATH += /extension/qextserialport/src
    #LIBS += /extension/qextserialport-linux-release/libqextserialport.so.1.2.0

    #static inside
    include(/extension/qextserialport/src/qextserialport.pri)
    MOC_DIR = linux-build/
    OBJECTS_DIR = linux-build/
    UI_DIR = linux-build/
    RCC_DIR = linux-build/
    TARGET = linux-build/serialQt-linux
    
    # rpath for LD_LIBRARY_PATH=.
    QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
    QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib
    QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/libs
    QMAKE_RPATH = QMAKE_LFLAGS
}
##to have dll/so shared lib
##DEFINES += QEXTSERIALPORT_USING_SHARED


SVNVERSIONH = $$system(svnversion $$PWD)
DEFINES += SVNVERSION=\\\"$$SVNVERSIONH\\\"


CONFIG += qextserialport

TRANSLATIONS += intl/ihmng_fr_FR.ts \
    intl/ihmng_en_GB.ts

RESOURCES += resources.qrc
